<template>
  <div>
    <div>
      <van-nav-bar
        title="地址"
        right-text="删除"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
      />
    </div>
    <div>
     
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { Toast } from "vant";
import httpApi from "@/http";
import Cart from "@/types/Cart";

const onClickLeft = () => history.back();
const onClickRight = () => Toast("按钮");


const list = reactive<Cart[]>([]);
const quer = () => {
  let params = { user_id: 1 };
  httpApi.cartApi.dizhiall(params).then((res) => {
    console.log(res);
    let goos: Cart[] = res.data.data;
    list.push(...goos);
    console.log(goos[0].city);
  });
};

onMounted(() => {
  quer();
});

</script>

<style lang="scss" scoped>
</style>